/* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
   Module Name          : com.yaodian100.core.sms.entity.Sms
   Module Description   :

   Date Created      : 2010/3/15
   Original Author   : afra.chou
   Team              : yaodian100
   ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
   MODIFICATION HISTORY
   ------------------------------------------------------------------------------
   Date Modified       Modified by       Comments
   ------------------------------------------------------------------------------
   ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
package com.yaodian100.core.sms.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import com.yaodian100.core.common.entity.BaseEntity;

/**
 * @author afra.chou
 * 
 */
@Entity
@Table(name = "COMM_SMS")
public class Sms extends BaseEntity {

	/**
	 * 
	 */
	private static final long serialVersionUID = 7714411268410082647L;

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO, generator = "seq_sms")
	@SequenceGenerator(name = "seq_sms", sequenceName = "SEQ_SMS")
	@Column(name = "MSG_ID", nullable = false)
	private Long msgId;

	/**
	 * 簡訊廠商提供
	 */
	@Column(name = "SMS_ID", length = 30)
	private String smsId;

	/**
	 * 目的電話號碼
	 */
	@Column(name = "DESTINATION_ADDRESS", length = 40, nullable = false)
	private String destAddress;

	/**
	 * 此筆SMS的狀態。0：初始狀態，1：已收到response，2：已收到receive delivery report
	 */
	@Column(name = "STATUS", length = 2, nullable = false)
	private String status;

	/**
	 * 簡訊內容
	 */
	@Column(name = "CONTENT", length = 500, nullable = false)
	private String content;

	/**
	 * 訂單編號
	 */
	@Column(name = "ORDER_ID", length = 20)
	private String orderId;

	/**
	 * respone 狀態，0為成功
	 */
	@Column(name = "RESPONSE_CODE", length = 5)
	private String responseCode;

	/**
	 * respone 回傳的reason code
	 */
	@Column(name = "RESP_REASON_CODE", length = 5)
	private String responseReasonCode;

	/**
	 * respone 回傳的 msgText
	 */
	@Column(name = "RESP_MSG_TEXT", length = 200)
	private String responseMessage;

	/**
	 * response 回傳的 時間
	 */
	@Column(name = "RESP_TIMESTAMP")
	@Temporal(TemporalType.TIMESTAMP)
	private Date responseTime;

	/**
	 * 傳送成功與否(receive delivery report)
	 */
	@Column(name = "STATUS_CODE", length = 2)
	private String statusCode;

	/**
	 * 系統商發簡訊後，收到回覆的時間(receive delivery report)
	 */
	@Column(name = "RECV_TIMESTAMP")
	@Temporal(TemporalType.TIMESTAMP)
	private Date receiveTime;

	/**
	 * 代碼(receive delivery report)
	 */
	@Column(name = "RECV_REASON_CODE", length = 5)
	private String receiveReasonCode;

	/**
	 * 系統商發簡訊的時間(receive delivery report)
	 */
	@Column(name = "OPERATOR_TIMESTAMP")
	@Temporal(TemporalType.TIMESTAMP)
	private Date operatorTime;

	/**
	 * 額外的資訊(receive delivery report)
	 */
	@Column(name = "STATUSTEXT", length = 300)
	private String statusText;

	/**
	 * 系統商(receive delivery report)
	 */
	@Column(name = "OPERATOR", length = 100)
	private String operator;

	/**
	 * 
	 */
	@Column(name = "SMS_NO", length = 20)
	private String smsNo;

	public Long getMsgId() {
		return msgId;
	}

	public void setMsgId(Long msgId) {
		this.msgId = msgId;
	}

	public String getSmsId() {
		return smsId;
	}

	public void setSmsId(String smsId) {
		this.smsId = smsId;
	}

	public String getDestAddress() {
		return destAddress;
	}

	public void setDestAddress(String destAddress) {
		this.destAddress = destAddress;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getOrderId() {
		return orderId;
	}

	public void setOrderId(String orderId) {
		this.orderId = orderId;
	}

	public String getResponseCode() {
		return responseCode;
	}

	public void setResponseCode(String responseCode) {
		this.responseCode = responseCode;
	}

	public String getResponseReasonCode() {
		return responseReasonCode;
	}

	public void setResponseReasonCode(String responseReasonCode) {
		this.responseReasonCode = responseReasonCode;
	}

	public String getResponseMessage() {
		return responseMessage;
	}

	public void setResponseMessage(String responseMessage) {
		this.responseMessage = responseMessage;
	}

	public Date getResponseTime() {
		return responseTime;
	}

	public void setResponseTime(Date responseTime) {
		this.responseTime = responseTime;
	}

	public String getStatusCode() {
		return statusCode;
	}

	public void setStatusCode(String statusCode) {
		this.statusCode = statusCode;
	}

	public Date getReceiveTime() {
		return receiveTime;
	}

	public void setReceiveTime(Date receiveTime) {
		this.receiveTime = receiveTime;
	}

	public String getReceiveReasonCode() {
		return receiveReasonCode;
	}

	public void setReceiveReasonCode(String receiveReasonCode) {
		this.receiveReasonCode = receiveReasonCode;
	}

	public Date getOperatorTime() {
		return operatorTime;
	}

	public void setOperatorTime(Date operatorTime) {
		this.operatorTime = operatorTime;
	}

	public String getStatusText() {
		return statusText;
	}

	public void setStatusText(String statusText) {
		this.statusText = statusText;
	}

	public String getOperator() {
		return operator;
	}

	public void setOperator(String operator) {
		this.operator = operator;
	}

	public String getSmsNo() {
		return smsNo;
	}

	public void setSmsNo(String smsNo) {
		this.smsNo = smsNo;
	}

}
